home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gDirection, gStartBack, gStartFor, gPlatform, gUpSnd, gDownSnd, gBeatSnd
- set tangent to (the mouseV - getAt(gOrigin, 2)) / (the mouseH - getAt(gOrigin, 1) + 0.00001)
- set startV to (atan(tangent) / PI) + ((the mouseH - getAt(gOrigin, 1)) < 0)
- repeat while the mouseDown
- if the commandDown then
- sound stop 2
- else
- if not soundBusy(2) then
- puppetSound(2, the number of member gBeatSnd)
- end if
- end if
- if rollOver(1) then
- cursor([the number of member "finger", the number of member "finger mask"])
- set tangent to (the mouseV - getAt(gOrigin, 2)) / (the mouseH - getAt(gOrigin, 1) + 0.00001)
- set currentV to (atan(tangent) / PI) + ((the mouseH - getAt(gOrigin, 1)) < 0)
- if (currentV > startV) and (currentV > 1) and (startV < 0) then
- set startV to 1.60000000000000009
- end if
- if currentV < startV then
- set gDirection to #Forward
- if (the ticks - gStartFor) > 20 then
- set gStartFor to the ticks
- if gPlatform = #PC then
- sound stop 2
- end if
- puppetSound(gUpSnd)
- end if
- if the frame = 13 then
- go(1)
- else
- go(the frame + 1)
- end if
- else
- if currentV > startV then
- set gDirection to #Reverse
- if (the ticks - gStartBack) > 20 then
- set gStartBack to the ticks
- if gPlatform = #PC then
- sound stop 2
- end if
- puppetSound(gDownSnd)
- end if
- if the frame = 1 then
- go(13)
- else
- go(the frame - 1)
- end if
- end if
- end if
- updateStage()
- end if
- set startV to currentV
- end repeat
- end
-